<?php
session_start();

	require("conn.php");
		if(!isset($_SESSION['User']))
{	
			header("Location:login.php");
	
		   
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SDDS Administrator</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript">
var color;
function changeback(control)
{  
color=control.style.backgroundColor;
control.style.backgroundColor="#2FB056";
}
function changebre(control)
{  
control.style.backgroundColor=color;
}  

</script>
</head>

<body>
<div id="id_all">
	<div   id="id_top">
    	<div id="id_top_login">
        Chào <?php echo $_SESSION["User"];?>  |<a href="logout"> Đăng xuất</a>
        </div>
    	<div id="id_top_menu"></div>
    </div>
    
    <div id="id_cen">
    	<div id="id_cen_left" >
        	
            	<div id="id_cen_left_box1_top">
                </div>
                
            
            <div class="class_box">
            	<div class="class_cen_box_top">
                	Quản lý nội dung
                </div>
                <div class="class_cen_box_cen">
                 <p><a href="article">Quản Lý bài viết</a></p>
                 <p><a href="image">Quản Lý Hình ảnh</a></p>
                 <p><a href='rslist'>Quản Lý Tài Nguyên</a></p>
                 <p><a href="menulist">Danh mục Menu</a></p>
                 <?php if($_SESSION['Permit']==1)
				 {  
				
				 	echo "<p><a href='sectionlist'>Quản lý chuyên mục</a></p>";
                 	echo "<p><a href='userlist'>Danh mục người dùng</a></p>";
				 }
				 ?>
                  <p><a href="userc">Thay Đổi Mật Khẩu</a></p>
                </div>
            </div>
          
        </div>
        <div id="id_cen_cen">
        	<?php
	if(isset($_GET["man"]))
	{
	  $ad=$_GET["man"];
		switch($ad)
		{
			case"article":
			include("Articles/listarticle.php");
			break;
			case"addarticle":
			include("Articles/addarticle.php");
			break;
			case"editarticle":
			include("Articles/editarticle.php");
			break;
			case"delarticle":
			include("Articles/delarticle.php");
			break;
			
			case "rslist":
			include ("resource/listresource.php");
			break;
			case "rsa":
			include ("resource/addresource.php");
			break;
			case "rse":
			include ("resource/editresource.php");
			break;
			case "rsd":
			include ("resource/delresource.php");
			break;
			//het
			
			case"menulist":
			include("Menu/ListMenu.php");
			break;
			case"menue":
			include("Menu/MenuDT.php");
			break;
			case"menua":
			include("Menu/MenuAdd.php");
			break;
			
			case"sectionlist":
			include("Section/ListSection.php");
			break;
			case"sectione":
			include("Section/sectionDT.php");
			break;
			case"sectiona":
			include("Section/SectionAdd.php");
			break;
			case"sectiond":
			include("Section/deletesection.php");
			break;
			
			case"userlist":
			include("User/Listuser.php");
			break;
			case"usere":
			include("User/userDT.php");
			break;
			case"usera":
			include("User/userAdd.php");
			break;
			
			case"userc":
			include("User/changepass.php");
			break;
			default:
			echo "Trang Web không tồn tại";
			break;
			
			case"image":
			include("Images/Listimage.php");
			break;
			case"imagee":
			include("Images/imageDT.php");
			break;
			case"imagea":
			include("Images/imageAdd.php");
			break;
			case "logout":
			include ("logout.php");
			default:
			echo "Trang Web không tồn tại";
			break;
		}
	}
	else
	{
	 	echo "<h1 style='margin-left:200px'>Welcome IDG GROUP</h1>";
		
	}
	?>
      
        </div>
       
    </div>
    <div id="id_fot">
    </div>
</div>
</body>
</html>
